﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;

namespace WoWAddonRefresh {
    public class Constants {
        public static string URL_WoWInterface = "http://www.wowinterface.com/downloads/filecpl.php?action=favorite";
        public static string URL_WoWInterface_Download = "http://www.wowinterface.com/downloads/";
        public static string URL_WoWInterface_RSS = "http://www.wowinterface.com/rss/myfav-{0}.xml";
        public static string URL_WoWInterface_Login = "http://www.wowinterface.com/forums/login.php?do=login";


        private static string wowFolder;
        public static string WoWFolder {
            get {
                if (wowFolder == null) {
                    RegistryKey pRegKey = Registry.LocalMachine;
                    pRegKey = pRegKey.OpenSubKey("SOFTWARE\\Blizzard Entertainment\\World of Warcraft");
                    wowFolder = (pRegKey == null) ? null : (pRegKey.GetValue("InstallPath") == null ? null : pRegKey.GetValue("InstallPath").ToString());
                }
                return wowFolder;
            }
        }

    }
}
